let userModel = require("../models/userModel");

module.exports={
    async getUserByUsernameAndPwd(username,pwd){
        let result = await userModel.findOne({username,pwd}).exec();
        return result;
    },
    async insertUser(username,pwd){
        return await userModel.create({username,pwd});
    },
    async getUserByUsername(username){
        return await userModel.findOne({username}).exec();
    }

}